import {ref} from "vue";
import {defineStore} from "pinia";

export const sysUserStore=defineStore('sysUserStore', () => {
    const userModel=ref({
        userId:'',
        userAccount:'',
        userName:'',
        departName:'',
        userGender:'',
        userState:'',
        posName:'',
        userPhone:'',
        userEmail:'',
        roleName:'',
    })
    return {userModel},
        {
            persist:{
                storage:sessionStorage,//把数据存入SessionStorage
                paths:['userModel']
            }

        }
})